package com.kmb.business.upload.feign;

import com.kmb.business.upload.feign.fallback.RemoteLogServiceFeignFallback;
import com.kmb.commons.dto.Response;
import com.kmb.configuration.FeignRequestConfiguration;
import com.kmb.provider.domain.SysLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 日志记录
 *
 * @see com.kmb.business.feign
 */
@FeignClient(value = "kmb-user-service", configuration = FeignRequestConfiguration.class, fallback = RemoteLogServiceFeignFallback.class)
public interface RemoteLogServiceFegin {

    /**
     * 保存日志
     *
     * @param sysLog 日志实体
     * @return succes、false
     */
    @PostMapping("/log")
    Response saveLog(@RequestBody SysLog sysLog);
}
